from selenium import webdriver
import time

driver = webdriver.Chrome()
driver.implicitly_wait(10)
driver.get("http://39.101.167.251/qftest/user/login.html")
driver.maximize_window()
time.sleep(1)
driver.find_element("id", "username").send_keys("test000000")
driver.find_element("id", "password").send_keys("123456")
driver.find_element("xpath", '//*[@id="login-form"]/div/a').click()
time.sleep(1)
driver.find_element("link text", '个人资料').click()
driver.find_element("xpath", '//*[@id="avatar-form"]/input[1]').send_keys(
    r"D:\FourthBro\test\WebUI\touxiang2.png")
driver.find_element("id", "save-avatar-btn").click()
time.sleep(2)
driver.quit()
